#include "CopyFileTask.h"
#include <QThread>

CopyFileTask::CopyFileTask(QObject *parent)
	: QObject(parent)
{}

CopyFileTask::~CopyFileTask()
{

}


void CopyFileTask::Copy(QString _qstrSrcDir, QString _qstrDrDir)
{
	int iCurNums = 0;
	int iSumNums = 100;
	while (m_blRunning)
	{
		//copy
		emit SignProgress(iCurNums);
		++iCurNums;
		if (iCurNums >= iSumNums)
		{
			break;
		}

		QThread::sleep(1);

	}
}

void CopyFileTask::SetTaskRunningStatus(bool _blRunning)
{
	m_blRunning = _blRunning;
}
